﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MetaCollection.Framework.Index
{
	public interface IDocumentFactory
	{
		/// <summary>
		/// Creates a new document factory based on a given request handler.
		/// </summary>
		/// <param name="handler">a request handler to be used as a source for resolving item uris.</param>
		/// <returns>a new document factory.</returns>
		IDocumentFactory CreateFactory(IRequestHandler handler);
		/// <summary>
		/// Returns a Lucene Document based on a given item uri.
		/// </summary>
		/// <param name="itemUri">the uri of an item to be requested from the IRequestHandler</param>
		/// <returns>a lucene document that can be written to an index.</returns>
		[CLSCompliant(false)]
		IEnumerable<Lucene.Net.Documents.Document> CreateDocument(Uri itemUri, bool includeVersions = false);
	}
}
